<template >
	<div v-if="isAlready">
		<div id="printCard" ref="printCard" class="box-card">

			<el-header class="box-card-header">
				 <div style="width: 100%">
					<div style="text-align: left;">
						<div style="margin-left: 0px;float: left;">
							<img class="stocktopblockimg" src="img/technolg.png"/>
						</div>
						<span style="font-size: 14px;height: 55px;line-height: 55px;margin-left: 10px;margin-top: 8px;">盘点报告</span>
						<div style="float: right;height: 40px;line-height: 40px;">

						<el-button link plain style="display: block;margin-top: 17px;" ref="exportBtn"  type="primary" :loading="loading"  @click="reportExportHTML">打印</el-button>
					</div>
					</div>

				 </div>
			</el-header>
			<div ref="printableArea" id="printMe" class="box-Card-Body" :style="'height:'+contentheight+'px;'">
				<div class="pdf-page">
					<div>
						<div style="display: flex;justify-content: center;align-items: center;">

							<h1 style="text-align: center;margin: 0 10px;">
								<!-- v-if="editDeptNameFlag" label ref="tileLiable" class="titleLabelClass" @click="editDeptName">{{ deptName }}</label-->

								<el-input v-if="!isprint" v-model="deptName"
								 class="deptNameinputread" @click="editDeptName"  type="text" placeholder="请输入部门名称" />
								 <span v-if="isprint">{{ deptName }}</span>
								{{ year }}{{ report.title }}</h1>
							<div style="width: 160px;">
							<el-button v-if="editDeptNameFlag" link plain style="margin: 0 10px;float: left;" type="primary"  @click="saveDeptName" :loading="loading">保存</el-button>
							<el-button v-if="editDeptNameFlag" link plain style="margin: 0 10px;float: left;" type="primary"  @click="restDeptName" :loading="loading">取消</el-button>
						</div>
						</div>
						<h1 style="text-align: center;font-size: 18.6px;margin-top: -5px;">(账内)</h1>
					</div>
					<div>
						<h2>一、基本情况介绍</h2>
						<el-row class="checkWorkPClass" style="padding-left: 22px;">
							<el-col :span="10">
								<p><strong>盘点目的：</strong>{{ introPurpose }}</p>
							</el-col>
							<el-col :span="8">
								<p><strong>盘点账面基准日：</strong>{{ introDate }}</p>
							</el-col>
						</el-row>
						<el-row class="checkWorkPClass" style="padding-left: 22px;">
							<el-col :span="10">
								<p><strong>盘点时间：</strong>{{ checkDate }}</p>
							</el-col>
							<el-col :span="8">
								<p><strong>盘点方式：</strong>{{ introMethod }}</p>
							</el-col>
						</el-row>
<!--						<p class="checkWorkPClass"><strong>5.盘点描述：</strong>为规范公司固定资产的管理，准确掌握公司实物资产的实有存量，保证公司实物资产的安全与完整，改善实物资产管理，提高实物资产使用效率，实现资产管理的科学化、规范化。根据国泰君安证券有限公司的资产盘点通知安排，盘点工作小组自{{startDate}}起对{{deptName}}各部门对固定资产逐一清点。本次盘点主要对资产全信息及使用情况进行确认。</p>-->
					</div>
					<div>
						<h2>二、盘点范围</h2>
						<p class="checkWorkPClass" style="padding-left: 22px;">本次盘点盘点范围，主要对公司的<span class="underlinespan">{{ checkScope }}</span>等资产进行数量、购置时间、规格型号、使用人及部分资产状态更新等信息进行盘点清查。</p>
					</div>
					<div>
						<h2>三、盘点工作情况说明</h2>
						<p class="checkWorkPClass" style="padding-left: 22px;padding-right: 22px;"><strong>(1)盘点过程：</strong></p>
						<p class="checkWorkPClass" style="padding-left: 22px;padding-right: 22px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;为规范公司固定资产的管理，准确掌握公司实物资产的实有存量，保证公司实物资产的安全与完整，改善实物资产管理，提高实物资产使用效率，实现资产管理的科学化、规范化。根据资产盘点通知安排，盘点工作小组自<span class="underlinespan">{{startDate}}起至{{endDate}}对{{deptName}}</span>的固定资产逐一清点。本次盘点主要对资产全信息及账实对应情况进行确认。</p>
						<p class="checkWorkPClass" style="padding-left: 22px;padding-right: 22px;"><strong>(2)盘点报告</strong></p>
						<div>
							<div>
								<p class="checkWorkPLevel2Class"><strong>1、盘点结果汇总：</strong></p>
								<p class="checkWorkPLevel2Class">本次盘点，总计应盘资产{{checkData.total}}个，实际盘点{{checkData.actual}}个，盘亏{{checkData.shortage}}个，盘盈新增{{checkData.surplus}}个；</p>
								<div class="checkWorkDivClass">
									<el-table width="100%" tableLayout="fixed" :border="true" :data="[checkData]">
										<el-table-column align="center" prop="total" label="应盘" />
										<el-table-column align="center" prop="actual" label="实盘" />
										<el-table-column align="center" prop="shortage" label="盘亏" />
										<el-table-column align="center" prop="surplus" label="盘盈" />
									</el-table>
								</div>
							</div>
						</div>
					</div>
					<div>
						<p class="checkWorkPLevel2Class"><strong>2、盘点结果详情：</strong></p>
						<div>
							<p class="checkWorkPLevel2Class"><strong>①．按资产类别汇总统计：</strong></p>
							<div class="checkWorkCountTableClass">
								<el-table tableLayout="fixed" :border="true" show-summary :data="assetcategoryCount">
									<el-table-column align="center" prop="name" label="资产分类" />
									<el-table-column align="center" label="账面" >
										<el-table-column align="center" prop="assetCount" label="数量" />
									</el-table-column>
									<el-table-column align="center" label="实盘">
										<el-table-column align="center" prop="actualCount" label="数量" />
										<el-table-column align="center" prop="actualOriginalValue" label="原值" />
										<el-table-column align="center" prop="actualNetValue" label="净值" />
									</el-table-column>
									<el-table-column align="center" label="盘亏">
										<el-table-column align="center" prop="shortageCount" label="数量" />
										<el-table-column align="center" prop="shortageOriginalValue" label="原值" />
										<el-table-column align="center" prop="shortageNetValue" label="净值" />
									</el-table-column>
									<el-table-column align="center" label="盘盈" >
										<el-table-column align="center" prop="surplusCount" label="数量" />
									</el-table-column>
								</el-table>
							</div>
						</div>
					</div>
				</div>
				<div class="pdf-page">
					<div class="largeTextClass">
						<p class="checkWorkPLevel2Class"><strong>②．按机构统计</strong></p>
						<!--el-switch v-if="hasBusinessDept && !isprint" ref="showDeptSwitch" style="margin-left: 10px;"
						v-model="showDeptCountFlag" active-text="机构汇总统计"/-->

						<el-checkbox v-if="hasBusinessDept && !isprint" v-model="showDeptCountFlag"
						class="pddccheckbox"  ref="showDeptSwitch" size="large" style="margin-left: 10px;margin-top: -5px;"
									>机构汇总统计
							</el-checkbox>
					</div>
					<div v-if="!isprint">
					<div v-if="!showDeptCountFlag" class="checkWorkCountTableClass lagerTableDiv departtable">
						<el-table :border="true" show-summary :data="deptCount.data">
							<el-table-column align="center" width="45"  type="index" label="序号" />
							<el-table-column align="center"  prop="name" label="机构名称" />
							<el-table-column align="center" v-for="(item) in deptCount.headerData" :label="item.label">
								<template v-if="item.childData && item.childData.length > 0">
									<el-table-column align="center" width="50"  v-for="(childItem) in item.childData" :prop="childItem.prop" :label="childItem.label">
									</el-table-column>
								</template>
							</el-table-column>
						</el-table>
					</div>
					<div class="checkWorkCountTableClass lagerTableDiv departtable" v-if="showDeptCountFlag">
						<el-table fit width="100%" tableLayout="fixed" :border="true" show-summary :data="summaryDeptCount.data">
							<el-table-column align="center" width="45" type="index" label="序号" />
							<el-table-column align="center" prop="name" label="机构名称" />
							<el-table-column align="center" v-for="(item) in summaryDeptCount.headerData" :label="item.label">
								<template v-if="item.childData && item.childData.length > 0">
									<el-table-column align="center" width="50" v-for="(childItem) in item.childData" :prop="childItem.prop" :label="childItem.label">
									</el-table-column>
								</template>
							</el-table-column>
						</el-table>
					</div>
				</div>
				<div v-else>
					<div v-if="!showDeptCountFlag" class="checkWorkCountTableClass lagerTableDiv departtable">
						<div  v-if="deptCount.data.length<=5">
							<el-table :border="true" show-summary :data="deptCount.data">
								<el-table-column align="center" width="45"  type="index"  label="序号" />
								<el-table-column align="center"  prop="name" label="机构名称" />
								<el-table-column align="center" v-for="(item) in deptCount.headerData" :label="item.label">
									<template v-if="item.childData && item.childData.length > 0">
										<el-table-column align="center" width="50"  v-for="(childItem) in item.childData" :prop="childItem.prop" :label="childItem.label">
										</el-table-column>
									</template>
								</el-table-column>
							</el-table>
						</div>
						<div v-else>
							<template v-for="mynum in deptCountpage">
								<el-table :border="true" show-summary :data="gettabletop(deptCount.data,(mynum-1))">
								<el-table-column align="center" width="45"  type="index" :index="indexGet((mynum-1))"
								 label="序号" />
								<el-table-column align="center"  prop="name" label="机构名称" />
								<el-table-column align="center" v-for="(item) in deptCount.headerData" :label="item.label">
									<template v-if="item.childData && item.childData.length > 0">
										<el-table-column align="center" width="50"  v-for="(childItem) in item.childData" :prop="childItem.prop" :label="childItem.label">
										</el-table-column>
									</template>
								</el-table-column>
							</el-table>
							</template>



						</div>
					</div>
					<div class="checkWorkCountTableClass lagerTableDiv departtable" v-if="showDeptCountFlag">
						<el-table fit width="100%" tableLayout="fixed" :border="true" show-summary :data="summaryDeptCount.data">
							<el-table-column align="center" width="45" type="index" label="序号" />
							<el-table-column align="center" prop="name" label="机构名称" />
							<el-table-column align="center" v-for="(item) in summaryDeptCount.headerData" :label="item.label">
								<template v-if="item.childData && item.childData.length > 0">
									<el-table-column align="center" width="50" v-for="(childItem) in item.childData" :prop="childItem.prop" :label="childItem.label">
									</el-table-column>
								</template>
							</el-table-column>
						</el-table>
					</div>
				</div>
				</div>
				<div class="pdf-page">
					<div v-if="isLastDept">
						<p class="checkWorkPLevel2Class"><strong>③．按总部、分公司、子公司汇总统计：</strong></p>
						<div class="checkWorkCountTableClass">
							<el-table tableLayout="fixed" show-summary :border="true" :data="checkReportDeptCount">
								<el-table-column align="center" prop="name" label="机构名称" />
								<el-table-column align="center" label="账面" >
									<el-table-column align="center" prop="assetCount" label="数量" />
								</el-table-column>
								<el-table-column align="center" label="实盘">
									<el-table-column align="center" prop="actualCount" label="数量" />
									<el-table-column align="center" prop="actualOriginalValue" label="原值" />
									<el-table-column align="center" prop="actualNetValue" label="净值" />
								</el-table-column>
								<el-table-column align="center" label="盘亏">
									<el-table-column align="center" prop="shortageCount" label="数量" />
									<el-table-column align="center" prop="shortageOriginalValue" label="原值" />
									<el-table-column align="center" prop="shortageNetValue" label="净值" />
								</el-table-column>
								<el-table-column align="center" label="盘盈" >
									<el-table-column align="center" prop="surplusCount" label="数量" />
								</el-table-column>
							</el-table>
						</div>
					</div>
				</div>
				<div class="pdf-page">
					<div v-if="assetOperateCount.data && assetOperateCount.data.length > 0">
						<p class="checkWorkCountPClass" style="margin-top: 10px;"><strong>(3)本次盘点期间资产调拨，转移，处置，闲置情况汇总：</strong></p>
						<div class="checkWorkCountTableClass lagerTableDiv">
							<el-table fit tableLayout="fixed" show-summary :border="true" :data="assetOperateCount.data">
								<el-table-column align="center" prop="deptName" label="机构名称" />
								<el-table-column align="center" v-for="(item) in assetOperateCount.headerData" :label="item.label">
									<template v-if="item.childData && item.childData.length > 0">
										<el-table-column align="center"  v-for="(chilItem) in item.childData" :prop="chilItem.prop" :label="chilItem.label">
										</el-table-column>
									</template>
								</el-table-column>
							</el-table>
						</div>
					</div>
					<div v-else>
						<p class="checkWorkPLevel2Class" style="margin-top: 10px;"><strong>(3)本次盘点期间资产调拨，转移，处置，闲置情况汇总：</strong>资产无变动情况</p>
					</div>
				</div>
				<div class="pdf-page">
					<div>
						<h2>四、财务账与资产台账差异情况</h2>

						<div>
							<div>
								<p class="checkWorkPClass">1、财务账共有{{ assetCount }}个资产，行政账共有{{ assetCount }}个资产，财务账比行政台账多0件资产。</p>
							</div>
							<div>
								<div class="largeTextClass">
									<p class="checkWorkPClass">2、财务账务与行政账务差异情况说明</p>
									<el-button ref="problemsBtn" v-if="financeFlag && !isprint" link plain style="margin-left: 5px;margin-top: 2px;height: 25px;" type="primary" @click="updateFinance" :loading="loading">编辑</el-button>
									<el-button v-if="!financeFlag" link plain style="margin-left: 5px;margin-top: 2px;height: 25px;" type="primary" @click="saveFinance" :loading="loading">保存</el-button>
									<el-button v-if="!financeFlag" link plain style="margin-left: 5px;margin-top: 2px;height: 25px;" type="primary" @click="restFinance" :loading="loading">取消</el-button>
								</div>
								<div ref="problemsDiv" v-if="!financeFlag" style="padding-left: 24px;">
									<quill-editor ref="quilldifferenceExplanation" content-type='html' :content="differenceExplanation" :options="editorOption" style="min-height: 100px"/>
									<!--el-input style="width: 700px;display: block;" ref="differenceExplanationInput" clearable type="textarea" v-model="differenceExplanation" :rows="8" placeholder="请输入内容" /-->
									<p class="checkWorkPClass" ref="differenceExplanationP" style="display: none;">{{differenceExplanation}}</p>
								
								</div>
								<div class="checkWorkPClass" v-if="financeFlag" style="padding-left: 24px;">									
										<div v-if="financeFlag" v-html="differenceExplanation"></div>
								</div>
							</div>
						</div>
					</div>
					<div>
						<div class="largeTextClass">
							<h2>五、目前资产管理中存在的问题</h2>
							<el-button ref="problemsBtn" v-if="problemsFlag && !isprint" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;" type="primary" @click="updateProblems" :loading="loading">编辑</el-button>
							<el-button v-if="!problemsFlag" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;" type="primary" @click="saveProblems" :loading="loading">保存</el-button>
							<el-button v-if="!problemsFlag" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;" type="primary" @click="restProblems" :loading="loading">取消</el-button>
						</div>
						<div ref="problemsDiv" v-if="!problemsFlag">
							<div v-if="checkProblems.length > 0" style="margin-top: -10px;padding-left: 24px;">
								<quill-editor ref="quillcheckProblems" content-type='html' 
								:content="checkProblems[0]" :options="editorOption" style="min-height: 100px"/>
								<!--el-input v-model="checkProblems[index]"  style="width: 700px;" type="textarea" placeholder="请输入问题说明" :rows="8" /-->
								<!--el-button style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="addProblems" :loading="loading" plain><el-icon><Plus/></el-icon>新增</el-button>
								<el-button v-if="index > 0" style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="delProblems(index)" :loading="loading" plain><el-icon><Minus/></el-icon>删除</el-button-->
							</div>
						</div>
						<div class="checkWorkPClass" style="margin-top: -10px;padding-left: 24px;" v-if="problemsFlag">
							<template v-for="(problems, index) in checkProblems">
								<div v-if="problems" v-html="problems"></div>								
							</template>
						</div>
					</div>
					<div>
						<div class="largeTextClass">
							<h2>六、本次盘点财务账务处理说明</h2>
							<el-button ref="explanationBtn" v-if="explanationFlag && !isprint" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;"  type="primary" @click="updateExplanation" :loading="loading">编辑</el-button>
							<el-button v-if="!explanationFlag" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;" type="primary" @click="saveExplanation" :loading="loading">保存</el-button>
							<el-button v-if="!explanationFlag" link plain style="margin-left: 5px;margin-top: 5px;height: 25px;" type="primary" @click="restExplanation" :loading="loading">取消</el-button>
						</div>
						<div ref="explanationDiv" v-if="!explanationFlag">
							<div v-if="explanations.length > 0"  style="margin-top: -10px;padding-left: 24px;"
								>
								<quill-editor ref="quillexplanations" content-type='html' 
								:content="explanations[0]" :options="editorOption" style="min-height: 100px"/>
								<!--el-input v-model="explanations[index]" style="width: 700px;" type="textarea" placeholder="请输入建议" :rows="8" /-->
								<!--el-button style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="addExplanation" :loading="loading" plain><el-icon><Plus/></el-icon>新增</el-button>
								<el-button v-if="index > 0" style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="delExplanation(index)" :loading="loading" plain><el-icon><Minus/></el-icon>删除</el-button-->
							</div>
						</div>
						<div class="checkWorkPClass" style="margin-top: -10px;padding-left: 24px;" v-if="explanationFlag">
							<template v-for="(explanation, index) in explanations">
								<div v-if="explanation" v-html="explanation"></div>								
							</template>
						</div>
					</div>
					<!--div>
						<div class="largeTextClass">
							<h2>七、资产管理工作建议及后续努力的方向</h2>
							<el-button ref="suggestionsBtn" v-if="suggestionsFlag" style="margin-left: 5px;margin-top: 10px;" type="primary" size="small" @click="updateSuggestion" :loading="loading" plain><el-icon><Edit/></el-icon>修改</el-button>
							<el-button v-if="!suggestionsFlag" style="margin-left: 5px;margin-top: 10px;" type="primary" size="small" @click="saveSuggestion" :loading="loading" plain><el-icon><Select/></el-icon>保存</el-button>
							<el-button v-if="!suggestionsFlag" style="margin-left: 5px;margin-top: 10px;" type="primary" size="small" @click="restSuggestion" :loading="loading" plain><el-icon><Close/></el-icon>取消</el-button>
						</div>
						<div class="checkWorkPClass" ref="inputDiv" v-if="!suggestionsFlag">
							<div v-if="suggestions.length > 0" class="largeTextClass" v-for="(suggestion, index) in suggestions" >
								<el-input v-model="suggestions[index]"  style="width: 500px;" type="textarea" placeholder="请输入建议" :rows="3" ></el-input>
								<el-button style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="addSuggestion" :loading="loading" plain><el-icon><Plus/></el-icon>新增</el-button>
								<el-button v-if="index > 0" style="margin-left: 5px;margin-top: 25px;" type="primary" size="small" @click="delSuggestion(index)" :loading="loading" plain><el-icon><Minus/></el-icon>删除</el-button>
							</div>
						</div>
						<div class="checkWorkPClass" v-if="suggestionsFlag">
							<template v-for="(suggestion, index) in suggestions">
								<p v-if="suggestion" :key="index">{{index+1+'.'}}{{ suggestion }}</p>
							</template>
						</div>
					</div-->
					<div class="bzDivCalss">
						<p class="marginClass">备注：</p>
						<p class="marginClass">IT设备：电子设备类</p>
						<p class="marginClass">非IT设备：除电子设备类、房产设备类、其他设备类的总称</p>
					</div>
					<div>
						<footer class="footerClass">
							<p class="footerPClass marginClass">资产管理员：</p>
							<p class="footerPClass marginClass">财务负责人：</p>
							<p class="footerPClass marginClass">单位负责人：</p>
							<p class="footerP2Class marginClass">{{ deptName }}</p>
							<p class="footerP2Class marginClass">报告日期：{{ nowDate }}</p>
						</footer>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>
<script>
import { Delete,Plus,Select, Edit, Close, Upload,Minus } from '@element-plus/icons-vue'
import scEcharts from "@/components/scEcharts/index.vue";
import html2canvas from "html2canvas";
import jsPDF from "jspdf";
import router from "@/router";
import useTabs from "@/utils/useTabs";
import tool from "@/utils/tool";

export default {
	components: {Upload,Edit,Plus,Delete,Select,Close,Minus, scEcharts},
	computed: {
	},
	data() {
		return {
			isAlready: false,
			deptName: '',
			oldDeptName: '',
			year: '',
			introDate: '',
			checkDate: '',
			startDate: '',
			endDate: '',
			nowDate: '',
			introPurpose: '全面了解固定资产使用情况',
			introMethod: '实地盘点法',
			checkScope: '',
			checkData: {
				total: 0,
				actual: 0,
				surplus: 0,
				shortage: 0
			},
			assetCount: 0,
			realityCount: 0,
			assetSummaryDescription: '',
			assetcategoryCount: [],
			deptCount : {
				headerData:[],
				data: [],
			},
			deptCountpage:1,
			editorOptionReadOnly:{},
			differenceExplanation:	'',
			hasBusinessDept:true,
			summaryDeptCount : {
				headerData:[],
				data: [],
			},
			isLastDept: false,
			checkReportDeptCount : [],
			assetOperateCount: {
				headerData: [],
				data: [],
			},
			suggestionsFlag: true,
			suggestions: [''],
			oldSuggestion:[''],
			checkProblems: [''],
			oldCheckproblemsFlag:'',
			problemsFlag: true,
			financeFlag:true,
			olddifferenceExplanation:'',
			explanations: [''],
			oldExplanations:[''],
			explanationFlag: true,
			showDeptCountFlag: false,
			editDeptNameFlag: false,
			isprint:false,
			editorOptionReadOnly:{},
			option:{
				title: {
					left: 'center'
				},
				tooltip: {
					trigger: 'item'
				},
				legend: {
					orient: 'vertical',
					left: 'right',
					itemWidth: 10,
					itemHeight: 5,
					textStyle: {
						fontSize: 10 // 设置图例字体大小为10
					},
				},
				series: [
					{
						name: '资产盘点',
						type: 'pie',
						radius: '50%',
						center: ['35%', '40%'],
						data: [
							{ value: 0, name: '盘盈' },
							{ value: 0, name: '盘亏' },
							{ value: 0, name: '实盘' }
						],
						label: {
							show: true,
							formatter: '{b}: {c} ({d}%)',
						},
					}
				]
			},
			report: {
				title: "年固定资产盘点报告",
				intro: {
					purpose: "全面了解固定资产使用情况",
					date: "2021年12月15日",
					period: "2021年12月X日—2021年12月X日",
					method: "实地盘点法",
					description: "为规范公司固定资产的管理，准确掌握公司实物资产的实有存量，保证公司实物资产的安全与完整，改善实物资产管理，提高实物资产使用效率，实现资产管理的科学化、规范化。根据XX集团的资产盘点通知安排，盘点工作小组自2021年XX月XX日起对XX集团各部门对固定资产逐一清点。本次盘点主要对资产全信息及使用情况进行确认。"
				},
				scope: "本次盘点盘点范围，主要对公司的一般固定资产（IT设备、非IT设备）、大宗固定资产（含车辆，房产）等进行数量、购置时间、规格型号、使用人及部分资产状态更新等信息进行盘点清查。",
				work: {
					process: "为规范公司固定资产的管理，准确掌握公司实物资产的实有存量，保证公司实物资产的安全与完整，改善实物资产管理，提高实物资产使用效率，实现资产管理的科学化、规范化。根据资产盘点通知安排，盘点工作小组自YY年YY月YY日起至YY年YY月YY日对XX的固定资产逐一清点。本次盘点主要对资产全信息及账实对应情况进行确认。",
				},
				problems: ["问题1", "问题2"],
				financial: {
					explanation: ["说明1", "说明2"]
				},

				signatures: {
					assetManager: "XXX",
					financeManager: "XXX",
					unitManager: "XXX"
				},
			},
			searchParams:{},
			fixedParams:{},
			loginUser: this.$TOOL.current.user(),
			loading:false,
			taskCode:'',
			title: '',
			contentheight:500,
		};
	},
	async created() {
		//如果是通过跳转过来的，标签的名称设置为跳转后的标题
		let route = router.currentRoute.value;
		if (route.meta) {
			this.title = route.meta.title;
		}
		let routeParams = this.$store.state.routeParams[this.$route.params.key];
		if (routeParams) {
			if (routeParams.title) {
				useTabs.setTitle(routeParams.title);
				document.title = routeParams.title;
			}
			if (routeParams.fixedParams) {
				if (routeParams.fixedParams.taskId) {
					this.searchParams.taskId = routeParams.fixedParams.taskId;
				}
				if (routeParams.fixedParams.ids) {
					this.searchParams.ids = routeParams.fixedParams.ids;
				}
				if (routeParams.fixedParams.taskCode) {
					this.taskCode = routeParams.fixedParams.taskCode;
				}
			}
			if (routeParams.searchParams) {
				Object.assign(this.searchParams, routeParams.searchParams);
			}
			this.searchParams.queryUser = this.loginUser.id;
		}
		await this.getData();
		this.isAlready = true;
	},
	async mounted() {
		window.addEventListener('resize', this.handleResize);
		this.handleResize();

		const modules = {
      toolbar: {
          container:[
          ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
          [{ header: 1 }, { header: 2 }], // 1、2 级标题
            // [{ direction: 'rtl' }], // 文本方向
          [{ size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] }], // 字体大小
          [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
          [{ align: [] }], // 对齐方式
          [{ size: ['small', false, 'large', 'huge'] }], // 字体大小
          [{ font: [] }], // 字体种类
          [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
          [{ direction: 'ltl' }], // 文本方向
          [{ direction: 'rtl' }], // 文本方向
          [{ indent: '-1' }, { indent: '+1' }], // 缩进
          [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
          [{ script: 'sub' }, { script: 'super' }], // 上标/下标
          ['blockquote', 'code-block'], // 引用  代码块
          ['clean'], // 清除文本格式
          ['link', 'image', 'video'], // 链接、图片、视频

        ]
        }
    }
    this.editorOptionReadOnly=  {
      readOnly: true,
      modules
    };
	},
	methods: {
		handleResize() {
			this.windowHeight=window.innerHeight;
			let fyheight=(this.windowHeight-50-42-16-60-10);

			this.contentheight=fyheight;
		},
		gettabletop(mydata,index){
			let topdata=[];
			if(index==0){
				for(var i=0;i<6;i++){

						topdata.push(mydata[i]);

				}
			}else{
				let startnum=((index-1)*10)+6;
				let endnum=(index*10)+6;
				for(var i=startnum;i<endnum;i++){
					if(mydata.length>i){
						topdata.push(mydata[i]);
					}
				}
			}
			return topdata;
		},
		indexGet(index){
			if(index==0){
				return 1;
			}else if(index==1){
				return 7;
			}else{
				return 7+(index-1)*10;
			}

		},

		async getData() {
			let res = await this.$API.asset.checkDetailApi.checkReport.post(this.searchParams);
			if (res.code === 2000 && res.data) {
				this.deptName = res.data.deptName;
				this.year = res.data.year;
				this.introDate = res.data.startDate;
				this.startDate = res.data.startDate;
				this.endDate = res.data.endDate;
				this.nowDate = res.data.nowDate;
				this.checkDate = res.data.startDate + '-' + res.data.endDate;
				this.checkScope = res.data.mainCategoryName;
				if(res.data.totalCount){
					this.checkData.total = res.data.totalCount;
				}
				if(res.data.doCount){
					this.checkData.actual = res.data.doCount;
				}
				if(res.data.surplusCount){
					this.checkData.surplus = res.data.surplusCount;
				}
				if(res.data.lossCount){
					this.checkData.shortage = res.data.lossCount;
				}
				if(res.data.assetCount){
					this.assetCount = res.data.assetCount;
				}
				if(res.data.realityCount){
					this.realityCount = res.data.realityCount;
				}
				if(this.assetCount >= this.realityCount){
					let difference = this.assetCount - this.realityCount;
					this.assetSummaryDescription = '财务账比资产实物多'+difference+'件资产';
				}else{
					let difference = this.realityCount - this.assetCount;
					this.assetSummaryDescription = '财务账比资产实物少'+difference+'件资产';
				}
				this.option.series[0].data = [
					{value: this.checkData.surplus, name: '盘盈'},
					{value: this.checkData.shortage, name: '盘亏'},
					{value: this.checkData.actual, name: '实盘'}
				];
				if(res.data.assetCategoryCountVos){
					this.assetcategoryCount = res.data.assetCategoryCountVos;
				}
				if (res.data.deptCount) {
					this.deptCount = res.data.deptCount;
					if(this.deptCount.data.length>5){
						this.deptCountpage=Math.ceil((this.deptCount.data.length-6)/10)+1;
					}
				}
				if (res.data.summaryDeptCount) {
					this.summaryDeptCount = res.data.summaryDeptCount;
				}
				if (res.data.isLastDept) {
					this.isLastDept = res.data.isLastDept;
				}
				if (res.data.checkReportDeptCount) {
					this.checkReportDeptCount = res.data.checkReportDeptCount;
				}
				if (res.data.assetOperateCount) {
					this.assetOperateCount = res.data.assetOperateCount;
				}
			}else {
				this.$message.warning(this.$t("code." + res.code));
			}
		},
		async exportPagePDF() {
			if(!this.explanationFlag){
				this.$message.warning('请先保存处理说明');
				return;
			}
			if(!this.suggestionsFlag){
				this.$message.warning('请先保存意见');
				return;
			}
			if(!this.problemsFlag){
				this.$message.warning('请先保存问题说明');
				return;
			}
			if(this.editDeptNameFlag){
				this.$message.warning('请先保存部门名称');
				return;
			}
			this.$refs.exportBtn.$el.style.display = 'none';
			this.$refs.problemsBtn.$el.style.display = 'none';
			this.$refs.explanationBtn.$el.style.display = 'none';
			this.$refs.suggestionsBtn.$el.style.display = 'none';
			this.$refs.differenceExplanationInput.$el.style.display = 'none';
			this.$refs.differenceExplanationP.style.display = 'block';
			this.$refs.tileLiable.className='';

			if(this.hasBusinessDept){
				this.$refs.showDeptSwitch.$el.style.display = 'none';
			}
			this.loading = true;
			try {
				const content = this.$refs.printableArea;
				const canvas = await html2canvas(content);
				const pdf = jsPDF({
					orientation: 'portrait',
					unit: 'mm',
					format: 'a4',
				});// A4纸，纵向
				const ctx = canvas.getContext('2d');
				const a4w = 190;
				const a4h = 270; // A4大小，210mm x 297mm，四边各保留20mm的边距，显示区域170x257
				const imgHeight = Math.floor(a4h * canvas.width / a4w); // 按A4显示比例换算一页图像的像素高度
				let renderedHeight = 0;

				while (renderedHeight < canvas.height) {
					const page = document.createElement('canvas');
					page.width = canvas.width;
					page.height = Math.min(imgHeight, canvas.height - renderedHeight);// 可能内容不足一页

					// 用getImageData剪裁指定区域，并画到前面创建的canvas对象中
					page.getContext('2d').putImageData(ctx.getImageData(0, renderedHeight, canvas.width, Math.min(imgHeight, canvas.height - renderedHeight)), 0, 0);
					pdf.addImage(page.toDataURL('image/jpeg', 1.0), 'JPEG', 10, 10, a4w, Math.min(a4h, a4w * page.height / page.width)); // 添加图像到页面，保留10mm边距

					renderedHeight += imgHeight;
					if (renderedHeight < canvas.height) {
						pdf.addPage();// 如果后面还有内容，添加一个空页
					}
				}
				pdf.save(this.deptName+'盘点报告.pdf');

			} finally  {
				this.loading = false;
				this.$refs.exportBtn.$el.style.display = 'block';
				this.$refs.problemsBtn.$el.style.display = 'block';
				this.$refs.explanationBtn.$el.style.display = 'block';
				this.$refs.suggestionsBtn.$el.style.display = 'block';
				this.$refs.differenceExplanationInput.$el.style.display = 'block';
				this.$refs.differenceExplanationP.style.display = 'none';
				this.$refs.tileLiable.className='titleLabelClass';
				if(this.hasBusinessDept){
					this.$refs.showDeptSwitch.$el.style.display = 'block';
				}
			}

		},
		async generatePDF() {
			if(!this.explanationFlag){
				this.$message.warning('请先保存处理说明');
				return;
			}
			if(!this.suggestionsFlag){
				this.$message.warning('请先保存意见');
				return;
			}
			if(!this.problemsFlag){
				this.$message.warning('请先保存问题说明');
				return;
			}
			if(this.editDeptNameFlag){
				this.$message.warning('请先保存部门名称');
				return;
			}
			this.$refs.exportBtn.$el.style.display = 'none';
			this.$refs.problemsBtn.$el.style.display = 'none';
			this.$refs.explanationBtn.$el.style.display = 'none';
			this.$refs.suggestionsBtn.$el.style.display = 'none';
			this.$refs.differenceExplanationInput.$el.style.display = 'none';
			this.$refs.differenceExplanationP.style.display = 'block';
			this.$refs.tileLiable.className='';
			if(this.hasBusinessDept){
				this.$refs.showDeptSwitch.$el.style.display = 'none';
			}
			this.loading = true;
			try {
				const pdf = new jsPDF('p', 'mm', 'a4');
				const content = this.$refs.printableArea;
				const contentHeight = content.clientHeight;
				const pageHeight = 2000; // A4 page height in pixels at 96 dpi
				const canvasWidth = content.clientWidth+50; // A4 page width in pixels at 96 dpi
				let heightLeft = contentHeight;
				let pageCount = 0;
				while (heightLeft > 0) {
					const canvas = await html2canvas(content, {
						scale: 1,
						useCORS: true,
						y: pageCount * pageHeight,
						width: canvasWidth,
						height: pageHeight,
						windowHeight: contentHeight
					});

					const imgData = canvas.toDataURL('image/jpeg',1.0);
					const imgWidth = 210; // A4 width in mm
					const imgHeight = (canvas.height * imgWidth) / canvas.width;
					if (pageCount > 0) {
						pdf.addPage();
					}
					pdf.addImage(imgData, 'JPEG', 5, 1, imgWidth, imgHeight);

					heightLeft -= pageHeight;
					pageCount++;
				}
				pdf.save(this.deptName+'盘点报告.pdf');
			} finally {
				this.loading = false;
				this.$refs.exportBtn.$el.style.display = 'block';
				this.$refs.problemsBtn.$el.style.display = 'block';
				this.$refs.explanationBtn.$el.style.display = 'block';
				this.$refs.suggestionsBtn.$el.style.display = 'block';
				this.$refs.differenceExplanationInput.$el.style.display = 'block';
				this.$refs.differenceExplanationP.style.display = 'none';
				this.$refs.tileLiable.className='titleLabelClass';
				if(this.hasBusinessDept){
					this.$refs.showDeptSwitch.$el.style.display = 'block';
				}
				this.$message.error('生成失败');
			}
		},
		reportExportHTML(){
			this.isprint=true;
			setTimeout(() => {
			let printWindow = window.open('', '_blank');
      const printContent = document.getElementById('printMe').innerHTML;
      const style = `
        <style>
		/*当前页面样式*/
          body { width:1200px;
		  padding-left: 5px;
		padding-right: 5px; }
          .box-card{
		width: 100%;
		line-height: 2.0;
		font-size: 15px;
		padding: 0px !important;
		background-color: #fff;

	}
	.box-card-header{
		border-bottom: 1px solid #e6e6e6;padding: 0 !important;
		margin-left: 10px;
		margin-right: 10px;
	}
	.box-Card-Body{
		scrollbar-width:auto !important;
		scrollbar-color: rgba(193,193,193,1) rgba(241,241,241,1);
		overflow: auto;
		margin-left: 25px;
		margin-right: 25px;
	}
	.stocktopblockimg{
		width: 40px;
		height: 40px;
		margin-top: 8px;
	}

	.checkWorkDivClass{
		width:60%;
		display: table;
		margin: 0 auto;
	}
	.checkWorkPClass{
		margin-left: 10px !important;
		font-size: 15px;
	}
	.checkWorkPLevel2Class{
		margin-left: 30px;
	}
		/*
	.jigouclass{
	margin-top: 500px !important;
	}
	*/
	.checkWorkEchartsClass{
		width: 35%;
		display: table;
		margin: 0 auto;
	}
	.checkWorkCountPClass{
		margin-left: 50px;
	}
	.checkWorkCountTableClass{
		margin-left: 0px;
		margin-right: 25px;
	}
	.checkWorkCountTableClass .el-table .el-table__row:hover .tablecode:hover span{
	color:#fff !important;
}

	.largeTextClass {
		display:flex;
		margin-top: 10px;
	}
	.footerClass {
		margin-top: 20px;
		text-align: right;
		padding-right: 70px;
		margin-bottom: 20px;
	}
	.footerPClass{
		margin-right: 120px;
		line-height: 50px;
	}
	.footerP2Class{
		line-height: 30px;
	}
	.marginClass{
		font-size: 14px;
	}
	.bzDivCalss{
		margin-top: 30px;
	}
	.titleLabelClass{
		text-decoration: underline;
		color: #0C73E8FF;
		line-height: 30px;
		cursor: pointer;
		font-size: 29.3px;
		font-weight: bold;
	}
	/* 添加样式以美化页面 */
	h1, h2 {
		color: #2c3e50;
	}
	h2{
		padding: 0 0 10px 0;
		font-size: 16px;
	}
	p, ul {
		color: #34495e;
	}
	.floating-button {
		position: fixed; /* 使按钮位置固定 */
		bottom: 20px;   /* 距离底部20像素 */
		right: 20px;    /* 距离右侧20像素 */
		z-index: 1000;  /* 确保按钮在其他内容之上 */
	}

	.underlinespan{
	color:#0C73E8FF;text-decoration: underline;
	}
	.deptNameinput{
		width: 150px;margin: 0 10px;
	}
	.deptNameinputread{
		width: 320px;margin: 0 0px;
		margin-top: -5px;
		font-size: 26px;
		text-align: right;
		--el-input-focus-border-color: transparent !important;
		--el-input-border-color: #fff !important;
		--el-input-hover-border-color:#fff;
		--el-input-focus-border-color:#fff;
		--el-select-input-focus-border-color: #fff !important;
		--el-select-input-hover-border-color: #fff !important;
		--el-select-border-color-hover: #fff !important;
	}

	/*表格样式*/

.popSettingClass {
	width: 150px;
	overflow: auto;
}

.divtable .el-table{
	--el-table-bg-color:none;
	--el-tabl-tr-bg-color:none;
	overflow: auto;
}
.el-table{
	border-collapse: collapse;
	border-color: rgba(0, 0, 0, .08) !important;
}
.el-table th{
	background-color:#F1F1F1 !important;
	border-color: rgba(0, 0, 0, .08) !important;
}
.el-table td{
	border-color: rgba(0, 0, 0, .08) !important;
}
/*表格头部的字体和大小样式 */
.el-table th div,.el-table th span{
	font-size: 11px;
	font-family: PingFangSC-Regular;

}
/*表格内容的字体和大小样式 */
.el-table td span,.el-table td div{
	font-size: 14px;
	font-family:PingFangSC-Regular;
	font-weight: 400 !important;
}

.el-table td .el-button.is-link span{
	font-size: 13px;
	margin-left: 0px;
}

.el-table td .el-button.is-link .el-icon,.el-table td .el-button.is-link .el-icon svg {
    height: 1.1em !important;
    width: 1.1em !important;
	color: rgb(78, 89, 105);
}

.el-table td .el-button.is-link:hover .el-icon,.el-table td .el-button.is-link:hover .el-icon svg {
	color: #fff
}

.el-table td .el-tag {
border-width: 0px;
padding-left: 9px;
padding-right: 9px;
}

.el-table td .el-tag span{
	font-size: 12px;
}

.el-table th div.cell{
	text-align: center;
	color: rgba(51, 51, 51, 1);
	font-size: 12.5px;
	font-weight: NaN;
	font-weight: 500;
	padding: 2px 5px;
}
.el-table td div.cell{
	padding: 1px 8px;
}

.divtable .el-table .el-table__row .el-button:hover .el-tag {
	border-color: #427CFF !important;

}

.divtable .el-table .el-table__row .el-button.is-link:has(.el-icon) {
	/*background-color: rgb(242, 243, 245);*/
}

.el-table__row--striped{
	background-color: rgba(0, 0, 0, 0.04) !important;
}


.el-table .rowClassWarning {
	color: rgb(255, 94, 94);
}
.el-table__empty-block{
	display: none;
}
.el-table .el-table__body-wrapper {
    background: #fff !important;
}

.el-pagination{
	background-color: #f6f6f6;
}
.statusclass{
	background-color: red;
}
.divtable .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell,.divtable .el-table--enable-row-transition .el-table__body td.el-table__cell  {
	background: none !important;
}


.divtable .el-checkbox .el-checkbox__inner {
	border-color: #919090 !important;
}

.divtable .el-checkbox .is-checked .el-checkbox__inner {
	border-color: #409eff !important;
}
/* 去掉鼠标悬停时的表格行颜色 */
.divtable .el-table .el-table__row:hover {
/*background-color: #DAE4FD !important;*/
	/*background-color:#EDEDED !important;*/
	background-color: rgba(0, 0, 0, 0.1) !important;
}

.divtable .el-table .el-table__row:hover .tablecode:hover{
	/*background-color: #DAE4FD !important;*/
	background-color:#427CFF !important;
}
.divtable .el-table .el-table__row:hover .tablecode:hover span{
	color:#fff !important;
}

.divtable .el-table .el-table__row:hover .tablecode:hover .is-link:hover {
	background-color: none !important;
	color: #fff;
	border-radius: 0px;
}
.divtable .el-table .el-table__row .tablecode .is-link span:hover {
	background-color: none !important;
}
.divtable .el-table .el-table__row:hover .tablecode:hover .is-link:hover span {
	background-color: none !important;
}
.el-button.is-link span:active,.el-button.is-link span:link {
	color: #fff !important;
}

/*表格滚动条*/
/*滚动条*/
.divtable .el-scrollbar {
	overflow: hidden;
	position: relative;
	height: 100%;
	--el-scrollbar-opacity: 0.8;
	--el-scrollbar-bg-color: var(--el-text-color-secondary);
	--el-scrollbar-hover-opacity: 1.0;
	--el-scrollbar-hover-bg-color: var(--el-text-color-secondary);
	outline: none;
	direction: ltr;
}
.divtable .el-scrollbar .el-scrollbar__wrap{
	scrollbar-width:auto !important;
	scrollbar-color: rgba(193,193,193,1) rgba(241,241,241,1);
	overflow: auto;
}
.divtable .el-scrollbar .el-scrollbar__bar.is-horizontal {
    height: 12px !important;
    left: 2px !important;
}
.divtable .el-scrollbar .el-scrollbar__bar.is-vertical {
	width: 12px;
    top: 2px;
}


 .divtable .el-scrollbar__bar{
	scrollbar-width:auto !important;
}

.divtable .el-scrollbar  .el-scrollbar__thumb{
	scrollbar-width:auto !important;
}

.divtable  .el-scrollbar__wrap--hidden-default {
 scrollbar-width: block !important;
}

.sytable .divtable .el-scrollbar .el-scrollbar__wrap {
	overflow:hidden !important;
}

.tablesummary{
	height: 30px;
    margin: 0px 0px 5px;
    padding: 5px 10px 5px 0px;
    border: 1px solid rgba(231, 228, 228, 0.69);
	background-color: #f6f6f6;
	float: left;
	border-right: 0px solid #f6f6f6;
}

.document-detail-table .el-table th div,.document-detail-table .el-table th span{
	font-weight: 500 !important;
}

.document-detail-table .el-table th{
	background-color: #fff !important;
}


.todolist .el-table--border .el-table__cell {
	border-right-width: 0px;
}

.todolist .el-table__header{
	display: none;
}
.el-table td.el-table__cell .el-container .is-link{
	/*margin-left: 0px !important;*/
}


.todolist .el-table td span,.todolist .el-table td div{
	font-size: 13px;
}
.todolist .el-table td .el-button.is-link span{
	font-size: 13px;
	color: rgb(96, 98, 102);
}
.todolist .el-table td .el-button.is-link span:hover{
	color: #fff;
}

/*
表格公共样式
*/
.el-table {
    font-size: 12px;
}
	.el-table {
    border-collapse: collapse;
    border-color: rgba(0, 0, 0, .08) !important;
}
	.el-table {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    height: fit-content;
    width: 100%;
    max-width: 100%;
    background-color: var(--el-table-bg-color);
    font-size: 14px;
    color: var(--el-table-text-color);
}

.el-table__inner-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.el-table .hidden-columns {
    visibility: hidden;
    position: absolute;
    z-index: -1;
}

.el-table__body, .el-table__footer, .el-table__header {
    table-layout: fixed;
    border-collapse: separate;
}

.el-table tr {
    background-color: #ffffff;
}
	.el-table .el-table__cell {
    padding: 8px 0;
    min-width: 0;
    box-sizing: border-box;
    text-overflow: ellipsis;
    vertical-align: middle;
    position: relative;
    text-align: left;
}
	.el-table thead th {
    font-weight: 600;
}

.el-table thead tr:first-child th {
     border-top: 1px solid #ebeef5;
}

.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf {
    border-bottom:1px solid #ebeef5;
}

.el-table--border th.el-table__cell {
    border-bottom: 1px solid #ebeef5;
}

.el-table--border .el-table__cell {
    border-right: 1px solid #ebeef5;
}
.el-table--border .el-table__cell:first-child {
    border-left: 1px solid #ebeef5;
}
	.el-table .el-table__cell.is-center {
    text-align: center;
}
	.departtable .el-table tbody tr{
		height:70px;
	}

/*vue公共样式*/
.el-row {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    box-sizing: border-box;
}
	.el-col-10 {
    max-width: 41.6666666667%;
    flex: 0 0 41.6666666667%;
}

.el-col-8 {
    max-width: 33.3333333333%;
    flex: 0 0 33.3333333333%;
}
        </style>
      `;
      printWindow.document.write('<html><head>');
      printWindow.document.write(style);
      printWindow.document.write('</head><body >');
      printWindow.document.write(printContent);
      printWindow.document.write('</body></html>');
      printWindow.document.close();
      printWindow.focus();
	  this.isprint=false;
      // 触发打印
      printWindow.print();
	}, 4000); // 延迟2秒执行

		},
		async reportExportPDF(){
			const content = this.$refs.printableArea;
			if(content.offsetHeight > 4500){
				await this.generatePDF();
			}else{
				await this.exportPagePDF();
			}
		},
		updateSuggestion() {
			this.oldSuggestion = [];
			Object.assign(this.oldSuggestion, this.suggestions);
			this.suggestionsFlag = false;
		},
		saveSuggestion() {
			this.oldSuggestion = [''];
			this.suggestionsFlag = true;
		},
		restSuggestion() {
			this.suggestions = [''];
			Object.assign(this.suggestions, this.oldSuggestion);
			this.oldSuggestion = [''];
			this.suggestionsFlag = true;
		},
		addSuggestion() {
			this.suggestions.push('');
		},
		delSuggestion(index) {
			//删除按钮所在的div
			this.suggestions.splice(index,1);
		},
		updateProblems() {
			this.oldCheckProblems = [];
			Object.assign(this.oldCheckProblems, this.checkProblems);
			this.problemsFlag = false;
		},
		saveProblems() {			 
			 this.checkProblems = [this.$refs.quillcheckProblems.getContents()];
			this.oldCheckProblems = [''];
			this.problemsFlag = true;
		},
		restProblems() {
			this.checkProblems = [];
			Object.assign(this.checkProblems, this.oldCheckProblems);
			this.oldCheckProblems = [''];
			this.problemsFlag = true;
		},
		addProblems() {
			this.checkProblems.push('');
		},
		delProblems(index) {
			//删除按钮所在的div
			this.checkProblems.splice(index,1);
		},
		updateExplanation() {
			this.oldExplanations = [];
			Object.assign(this.oldExplanations, this.explanations);
			this.explanationFlag = false;
		},
		saveExplanation() {
			this.explanations = [this.$refs.quillexplanations.getContents()];
			
			this.oldExplanations = [''];
			this.explanationFlag = true;
		},
		restExplanation() {
			this.explanations = [];
			Object.assign(this.explanations, this.oldExplanations);
			this.oldExplanations = [''];
			this.explanationFlag = true;
		},
		addExplanation() {
			this.explanations.push('');
		},
		delExplanation(index) {
			//删除按钮所在的div
			this.explanations.splice(index,1);
		},
		editDeptName(){
			this.editDeptNameFlag = true;
			this.oldDeptName = '';
			this.oldDeptName = this.deptName;
		},
		saveDeptName(){
			this.editDeptNameFlag = false;
			this.oldDeptName = '';
		},
		restDeptName(){
			this.deptName = this.oldDeptName;
			this.oldDeptName = '';
			this.editDeptNameFlag = false;
		},
		updateFinance() {
			this.olddifferenceExplanation=this.differenceExplanation;
			this.financeFlag = false;
		},
		saveFinance() {
			this.differenceExplanation=this.$refs.quilldifferenceExplanation.getContents();
			this.financeFlag = true;
			this.oldDeptName = '';
		},
		restFinance(){
			this.differenceExplanation = this.olddifferenceExplanation;
			this.olddifferenceExplanation = '';
			this.financeFlag = true;
		},
	}
};
</script>

<style scoped>
	.box-card{
		width: 100%;
		line-height: 2.0;
		font-size: 14px;
		padding: 0px !important;
		background-color: #fff;

	}
	.box-card-header{
		border-bottom: 1px solid #e6e6e6;padding: 0 !important;
		margin-left: 10px;
		margin-right: 10px;
	}
	.box-Card-Body{
		scrollbar-width:auto !important;
		scrollbar-color: rgba(193,193,193,1) rgba(241,241,241,1);
		overflow: auto;
		margin-left: 25px;
		padding-right: 25px;
	}
	.stocktopblockimg{
		width: 40px;
		height: 40px;
		margin-top: 8px;
	}

	.checkWorkDivClass{
		width:60%;
		display: table;
		margin: 0 auto;
	}
	.checkWorkPClass{
		margin-left: 10px !important;
		font-size: 14px;
	}
	.checkWorkPLevel2Class{
		margin-left: 30px;
	}
	.checkWorkEchartsClass{
		width: 35%;
		display: table;
		margin: 0 auto;
	}
	.checkWorkCountPClass{
		margin-left: 50px;
	}
	.checkWorkCountTableClass{
		margin-left: 0px;
		margin-right: 25px;
	}
	.checkWorkCountTableClass .el-table .el-table__row:hover .tablecode:hover span{
	color:#fff !important;
}

	.largeTextClass {
		display:flex;
		margin-top: 10px;
	}
	.footerClass {
		margin-top: 20px;
		text-align: right;
		padding-right: 70px;
		margin-bottom: 20px;
	}
	.footerPClass{
		margin-right: 120px;
		line-height: 50px;
	}
	.footerP2Class{
		line-height: 30px;
	}
	.marginClass{
		font-size: 14px;
	}
	.bzDivCalss{
		margin-top: 30px;
	}
	.titleLabelClass{
		text-decoration: underline;
		color: #0C73E8FF;
		line-height: 30px;
		cursor: pointer;
		font-size: 29.3px;
		font-weight: bold;
	}
	/* 添加样式以美化页面 */
	h1, h2 {
		color: #2c3e50;
	}
	h2{
		padding: 0 0 10px 0;
		font-size: 16px;
	}
	p, ul {
		color: #34495e;
	}
	.floating-button {
		position: fixed; /* 使按钮位置固定 */
		bottom: 20px;   /* 距离底部20像素 */
		right: 20px;    /* 距离右侧20像素 */
		z-index: 1000;  /* 确保按钮在其他内容之上 */
	}

	.underlinespan{
	color:#0C73E8FF;text-decoration: underline;
	}
	.deptNameinput{
		width: 150px;margin: 0 10px;
	}
	.deptNameinputread{
		width: 340px;margin: 0 0px;
		margin-top: -5px;
		font-size: 26px;
		text-align: right;
		--el-input-focus-border-color: transparent !important;
		--el-input-border-color: #fff !important;
		--el-input-hover-border-color:#fff;
		--el-input-focus-border-color:#fff;
		--el-select-input-focus-border-color: #fff !important;
		--el-select-input-hover-border-color: #fff !important;
		--el-select-border-color-hover: #fff !important;
	}


</style>
